From: Tim Lunn Date: Tue, 29 Oct 2013 07:12:10 +0000 (+1100) Subject: remove direct access to jsapi X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3150 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7296bedd8e958d2cfeddd8af8382a74eb88dac9c;p=gnome-shell.git remove direct access to jsapi with js24 its not possible to access jsapi directly from C code https://bugzilla.gnome.org/show_bug.cgi?id=711052 --- diff --git a/src/main.c b/src/main.c index a563c085d..c3ff6111e 100644 --- a/src/main.c +++ b/src/main.c @@ -29,8 +29,6 @@ #include "shell-perf-log.h" #include "st.h" -#include - extern GType gnome_shell_plugin_get_type (void); #define SHELL_DBUS_SERVICE "org.gnome.Shell" diff --git a/src/shell-global.c b/src/shell-global.c index 04e272464..e453df2cd 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -1142,44 +1141,6 @@ shell_global_on_gc (GjsContext *context, global->last_gc_end_time = g_get_monotonic_time (); } -/** - * shell_global_get_memory_info: - * @global: - * @meminfo: (out caller-allocates): Output location for memory information - * - * Load process-global data about memory usage. - */ -void -shell_global_get_memory_info (ShellGlobal *global, - ShellMemoryInfo *meminfo) -{ - JSContext *context; - gint64 now; - -#ifdef HAVE_MALLINFO - { - struct mallinfo info = mallinfo (); - meminfo->glibc_uordblks = info.uordblks; - } -#else - meminfo->glibc_uordblks = 0; -#endif - - context = gjs_context_get_native_context (global->js_context); - - meminfo->js_bytes = JS_GetGCParameter (JS_GetRuntime (context), JSGC_BYTES); - - meminfo->gjs_boxed = (unsigned int) gjs_counter_boxed.value; - meminfo->gjs_gobject = (unsigned int) gjs_counter_object.value; - meminfo->gjs_function = (unsigned int) gjs_counter_function.value; - meminfo->gjs_closure = (unsigned int) gjs_counter_closure.value; - - now = g_get_monotonic_time (); - - meminfo->last_gc_seconds_ago = (now - global->last_gc_end_time) / G_TIME_SPAN_SECOND; -} - - /** * shell_global_notify_error: * @global: a #ShellGlobal diff --git a/src/shell-global.h b/src/shell-global.h index b445c428d..ec4a08963 100644 --- a/src/shell-global.h +++ b/src/shell-global.h @@ -69,10 +69,6 @@ typedef struct { guint last_gc_seconds_ago; } ShellMemoryInfo; -void shell_global_get_memory_info (ShellGlobal *global, - ShellMemoryInfo *meminfo); - - /* Run-at-leisure API */ void shell_global_begin_work (ShellGlobal *global); void shell_global_end_work (ShellGlobal *global);